from rest_framework.pagination import PageNumberPagination as PNP

from rest_framework.pagination import CursorPagination


class PageNumberPagination(PNP):
    page_size = 4
    page_query_param = 'page'
    page_size_query_param = 'size'
    max_page_size = 30


class MyCursorPagination(CursorPagination):
    cursor_query_param = 'cursor'      # 每一页查询的key
    page_size = 1  # 每页显示的条数
    ordering = 'current_section_name'  # 排序字段